package src.medium._0022.pck;

import java.util.List;

/**
 * 加深动态规划的理解
 */
public class GenerateParentheses01 {
    public static void main(String[] args) {
        Solution solution = new GenerateParentheses01().new Solution();
        final List<String> strings = solution.generateParenthesis(3);
        System.out.println(strings);
    }

    //leetcode submit region begin(Prohibit modification and deletion)
    class Solution {
        public List<String> generateParenthesis(int n) {
            generate(0, 2 * 3, "");
            return null;
        }

        private void generate(int level, int max, String s) {
            System.out.println(String.format("level = %d, 时，字符串：%s", level, s));
            if (level >= max) {
                // System.out.println("s = " + s);
                return;
            }
            generate(level + 1, max, s + "(");
            generate(level + 1, max, s + ")");
        }
    }
//leetcode submit region end(Prohibit modification and deletion)

}